<?php
class ImgUploads{
	
	public function ImgUpload($photoPath, $photoName){
		
		if( $_FILES["photo"]["error"] == UPLOAD_ERR_OK ){
			$photoName = $photoName.substr($_FILES["photo"]["name"], -5);
			return move_uploaded_file($_FILES["photo"]["tmp_name"], $photoPath.$photoName ) ? $photoName : false ;
		}else{
			return false;
		}
		
	}
	
}
	
?>
